This invention relates to a method and an apparatus for processing data, for example image data or video data.
It is common practice to store image data and video data in digital form. That is, each frame of a motion picture, television program, etc is divided into pixels, which are arranged in rows and columns. Similarly, an image is divided into pixels. A digital value is then stored for each of those pixels. The digital values can be read out of the storage and converted into an image in an appropriate player device.
The digital storage of the image or video data also allows various video processing functions to be performed. That is, the digital values can be manipulated, in order to alter the appearance of the image when the signal is supplied to the player device.
It is recognized that video processing functionality can advantageously be provided on a Programmable Logic Device (PLO) such as a Field Programmable Gate Array (FPGA), because such devices can efficiently provide the required processing resources.
One of the issues raised by digital image or video processing relates to the large amount of data storage capacity that is required. For example, FPGA devices typically do not include large amounts of memory, and so it is often necessary to store the data in a separate device, retrieve the data to the FPGA device for processing, and then store the data again in the separate device.
Many video processing functions produce an output value for each pixel by calculating a function of the original pixel values for that pixel and for one or more adjacent or surrounding pixels. In order to be able to perform such functions, it is necessary for the video processing device to store temporarily the data relating to the calculations that it is performing at that time, because it is not practical to retrieve the data from an external device within the required timescale. For example, where the video processing function involves calculating a new value for a pixel, based on original values for that pixel, and for pixels in the lines above and below that pixel, then the video processing device may store the original data values for two lines of pixels in a line buffer. This allows the data to be retrieved from the external memory device sequentially, and such sequential accesses can be performed more efficiently than non-sequential accesses, which is a requirement if high data rates are to be achieved.
However, although this reduces the amount of data storage required on the video processing device, it still places a significant burden on the available memory resources on some video processing devices, particularly when the video processing device is required to handle high definition television signals, with large numbers of pixels in each line and/or large numbers of data bits for each pixel.